<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>判断闰年</title>
    <script>
        function year(temp) {
            var lis = false
            if (temp % 4 == 0 && temp % 100 != 0 || temp % 400 == 0) {
                lis = true
            }
            return lis
        }
        console.log(year(2000));
        console.log(year(1999));
    </script>
</head>
<body>
    
</body>
</html>